package bb.lanxing.model.lushu;

import androidx.collection.ArrayMap;
import java.util.Map;

public class InMemoryRouteBookCacheStrategy implements RouteBookCacheStrategy {
    private final Map<String, String> cache = new ArrayMap<>();

    @Override
    public void put(String key, String direction) {
        this.cache.put(key, direction);
    }

    @Override
    public String get(String key) {
        return this.cache.get(key);
    }

    @Override
    public void release() {
        this.cache.clear();
    }
}
